package  
{
	
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.graphics.Spritemap;
	
	/**
	 * ...
	 * @author Felix Fleiß, Martina Rasch
	 */
	public class Power extends Entity
	{
		//embed image
		[Embed(source = 'res/animatedPower.png')] 
		private const POWER:Class;
		
		private var power:Spritemap = new Spritemap(POWER, 50, 50);
		
		public function Power() 
		{
			graphic = power;
			graphic.x = -25;
			graphic.y = -25;
			
			power.add("power", [0, 1, 0, 2], 60, true); 
		}
		public function setPos(_x:int, _y:int):void
		{
			this.x = _x;
			this.y = _y;
		}
		
		override public function update():void {
			power.play("power");
		}
		
	}

}